package com.itheima.mapper.system;

import com.itheima.domain.system.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {

    User findUnameAndPwd(@Param("username") String username, @Param("password") String password);

    void updatePassword(@Param("password") String password, @Param("id") String id);

    User findEmail(String email);

    int setPassword(@Param("password") String password, @Param("email") String email);




    int save(User user);

    int delete(User user);

    void deleteById(String[] id);

    int update(User user);

    User findById(String id);

    List<User> findAll();

    /**
     * 单个用户的详细信息
     * @param id
     * @return
     */
    User selectOne(String id);

    //模糊查询
    List<User> findByName(String username);
    //更改状态按钮
    void turnStatus(@Param("id") String id,@Param("status")int sta);
}
